import request from "@/utils/request";
// 获取对应仓库所有数据
export function getStore(data) {
  return request({
    url: "/materials",
    method: "get",
    params: data,
  });
}

// 获取对应材料信息
export function getAuth(data) {
  return request({
    url: "/auth",
    method: "patch",
    data,
  });
}

// 添加材料
export function postmaterials(data) {
  return request({
    url: "/materials",
    method: "post",
    data,
  });
}

// 历史记录
export function getRegister(data) {
  return request({
    url: `/materialsHistory?page=${data.page}&pagesize=${data.pagesize}
    &keywords=${data.keywords}&add_time=${data.add_time}&project_id=${data.project_id}`,
    method: "get",
  });
}

// 依据材料获取所有记录
export function getAllmaterials(data) {
  return request({
    url: `/materialsHistory`,
    method: "put",
    data
  });
}